﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Tunnel.DevicesControls
{
    public partial class FCMSControl : TextBox
    {
        string fontSize;
        string fontColor;
        string backgroundColor;
        string textShow;

        string numberOfFCMS;

        /// <summary>
        /// 情报板字体大小
        /// </summary>
        public string FontSize
        {
            get
            {
                return fontSize;
            }

            set
            {
                if (value == "16x16")
                {
                    this.Font = new Font(this.Font.FontFamily, 32); 
                }
                if (value == "32x32")
                {
                    this.Font = new Font(this.Font.FontFamily, 48);
                }
                
                fontSize = value;
            }
        }
        /// <summary>
        /// 字体颜色
        /// </summary>
        public string FontColor
        {
            get
            {
                return fontColor;
            }

            set
            {
                if(value=="红色")
                {
                    this.ForeColor = Color.Red;
                }
                if(value=="绿色")
                {
                    this.ForeColor = Color.Green;
                }
                if (value == "蓝色")
                {
                    this.ForeColor = Color.Blue;
                }
                if (value == "黄色")
                {
                    this.ForeColor = Color.Yellow;
                }
                fontColor = value;
            }
        }
        /// <summary>
        /// 背景颜色
        /// </summary>
        public string BackgroundColor
        {
            get
            {
                return backgroundColor;
            }

            set
            {
                backgroundColor = value;
            }
        }
        /// <summary>
        /// 显示内容
        /// </summary>
        public string TextShow
        {
            get
            {
                return textShow;
            }

            set
            {
                this.Text = value;
                textShow = value;
            }
        }
        /// <summary>
        /// 第几屏
        /// </summary>
        public string NumberOfFCMS
        {
            get
            {
                return numberOfFCMS;
            }

            set
            {
                numberOfFCMS = value;
            }
        }

        public FCMSControl()
        {
            InitializeComponent();
        }

        protected override void OnPaint(PaintEventArgs pe)
        {
            base.OnPaint(pe);
        }
    }
}
